"use strict";
exports = module.exports = function ($scope, $alert){
    $scope.fun1 = function (){ $alert.success() };
    $scope.fun2 = function (){ $alert.success("保存成功") };
    $scope.fun3 = function (){ $alert.error() };
    $scope.fun4 = function (){ $alert.error("保存失败") };
    $scope.fun5 = function (){ $alert.msg('自定义', {icon:3}) };
    $scope.fun6 = function (){ $alert.success("保存成功", function(close){$alert.msg("保存成功");close()}) };
    $scope.fun7 = function (){ $alert.error("保存失败", function(close){$alert.msg("保存失败");close()}) };
    $scope.fun8 = function (){ $alert.warning("服务器过热") };
    $scope.fun9 = function (){ $alert.info("请注意天黑了狼来了", function(close){$alert.msg("请注意天黑了狼来了");close()}) };
    $scope.fun10 = function (){
        //待开发
        $alert.open({
            type: 1, title: false, closeBtn: 0, shadeClose: true, skin: "yourclass",
            content: `<div class="modal-header"> <h3 class="modal-title">Modal!</h3> </div> <div class="modal-body"> </div> <div class="modal-footer"> <button class="btn btn-default" ng-click="cancel()">Cancel</button> <button class="btn btn-primary" ng-click="ok()">OK</button> </div>`
        });
    };
    $scope.fun11 = function (){ $alert.prompt("请输入你要做什么的原因", function(text, close){$alert.msg(text);close()}) };
    $scope.fun12 = function (){ $alert.promptPw("请输入口令", function(text, close){$alert.msg(text);close()}) };

    $scope.fun20 = function (){
        $alert.alert("初体验layer弹窗", {icon: 1, title:"icon: 1"}, function(close){
            $alert.alert("初体验layer弹窗", {icon: 2, title:"icon: 2"}, function(close){
                $alert.alert("初体验layer弹窗", {icon: 3, title:"icon: 3"}, function(close){
                    $alert.alert("初体验layer弹窗", {icon: 4, title:"icon: 4"}, function(close){
                        $alert.alert("初体验layer弹窗", {icon: 5, title:"icon: 5"}, function(close){
                            $alert.alert("初体验layer弹窗", {icon: 6, title:"icon: 6"}, function(close){
                                alert("怎么样?")
                                close();
                            })
                            close();
                        })
                        close();
                    })
                    close();
                })
                close();
            })
            close();
        })
    };

    $scope.fun21 = function (){
        $alert.confirm(
            "您是如何看待前端开发？",
            function(close){ $alert.success("的确很重要"); close() },
            function(close){ $alert.error("还好吧"); close() },
            {btn: ["重要", "奇葩"]}
        )
    };
}
